{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "78b92d73",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "8e536638",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD9CAYAAACsq4z3AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAdKElEQVR4nO3dfXRU9b3v8ffX8Ex4iEmMLAERdRG03BaMClYRFauoiKtaHqwVrTTKFa4t1RpQaysqKIV1jg/Vi09wLq0gnFLAFi2LA42CQsEDPRVyCmJUkAiE8BByAJN87x8ZxgxJmEkyySQ7n9daWdn7t38z8/2tDZ/s+c3ee8zdERGR5u+0RBcgIiLxoUAXEQkIBbqISEAo0EVEAkKBLiISEAp0EZGAUKBLi2Bmq83Ma/gZFOpjZjbFzL4ws/8xs1wz+06CSxeJmek8dGkJzOwCoPNJzU8A/YFu7l5qZpOBXwIPAXnAJOAS4FvuXtCY9YrUhQJdWiQzawMUAAvcfbyZtQO+Ama6+xOhPh2BfOD/uvujCStWJEaacpGW6nogBXgztH4ZFUfwb53o4O5HgGXAsEavTqQOGvUIPS0tzXv16tVorydSkx07dlBcXEy/fv0wM/bs2cMXX3zBgAEDMLNwv4KCAnbv3k3//v0TWK20dBs3btzn7unR+jVqoGdlZfmGDRsa7fVEqlNSUsIZZ5zBvffey8yZMwF46qmnmDFjBgcOHIjo++qrr/KTn/yEY8eO0aZNmwRUKwJmttHds6L105SLtDjLli3jyJEjjBkzJtGliMSVAl1anPnz53PeeeeRlfXNAU9KSgrFxcWUlZVF9C0qKqJDhw46OpdmQYEuLcrBgwdZvnx5laPzzMxMysrK2L59e0R7Xl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771rW/xzDPPMGzYsCpTFbm5uYwfP54tW7aE25566immTJlS7esdPnyYiy66iG3btoXbFi1axK233lql76pVqxg6dGj4D8SZZ57J5s2bOeOMMyL67du3j+LiYoCIPzK33norv/nNb6qtAyqmqBqTLv1vOLr0v2WJ9W6LzfpD0e7duwOQn58f0Z6WlhZzeM2ePTsizL/3ve/xxz/+kfbt21fbf/Dgwaxdu5bBgwfz97//HYCpU6eSnZ1NWlpalf6dOnViwYIFDBo0KDzdMm7cOC666KKIGvfu3csdd9wRDvPTTjuNefPmVQnzE+Or7rWSk5MbPbRFpOlo0VMuZWVlPPvss+H1jIwMFi5cWGOYn9ClSxfmzZsXPno/evQos2fPrrF///79I46cDxw4wKhRo/j666+BincJd955J19++WW4z5QpU7jmGl23JSKxa9GB/u6777Jjx47w+kMPPUTnzp1jemy/fv0izq55++23T9l/woQJfP/73w+vr1+/nsmTK25cOWPGjIh3CZdffjm/+tWvYqpDROSEFh3oq1atilivad69JldccUV4eePGjVHPYHnttdcipkRmzZrFE088wSOPPBJuS01N5c033yQpKalWtYiINOs59Ppas2ZNeDk5ORl3rzIffyqtW7cOLx8/fpwvv/yyypkwlXXt2pX58+dzxRVX8PXXX+PuPP744xF93njjjfBnAyIitdGiA33nzp3h5eLi4lOGcSz2798f9TkuvfRSnn76aR566KEq2376058yfPjwetUgIi1Xi55y2b9/f1yf78SphNFMmjSJs846K6Lt3HPP5ZlnnolrPSLSsrToQD9xlkm8xHpO/7PPPsuuXbsi2j799FPee++9uNYjIi1Liw70008/Pbx8xhln4O71+ol2nxiADz74gMcee6xKe3l5OXfccQd79lT7TX4iIlG16ECvfNHO/v37a7yEP16KiooYM2YMpaWlQMX3gd544zdX/BUUFHDnnXfGfKQvIlJZIAK9rncSHDhwYHi5tLSUjz76KF4lVeuee+7hs88+C69PmjSJJUuWRJz++O6770Zc7CQiEqtABHrbtm0j1o8fPx7T44YOHRqx/tZbb8WtppO98MILLF68OLx+8cUXM23aNJKSkvj9739Pauo33/D36KOPsm7dupiet/LYYx23iARTIAK9S5cuEesFBQUxPW748OF069YtvP7b3/6WTz/9NK61QcXtdh988MHwepcuXViwYEH4PPbu3bvzxhtvhLeXlpYyevRoDh48GPW5K4891nGLSDAFItB79+5Nq1bfnFJ/8hWgNWnXrh05OTnh9SNHjnDTTTfx+eef1+r1N23aRE13kSwuLmbUqFERV5G+8sorVc5XHz58OA888EB4PT8/n3HjxkV97T59+oSX//a3v8V86qSIBE9MgW5mXc1skZnlmdlWMxtkZqeb2Qoz2xb6ndLQxdakbdu2XHrppeH11atXM27cOFauXMm2bdvIz88P/5x8FDthwgSGDRsWXt+yZQv9+/dn5syZFBUV1fian3/+OS+++CJXXnkl/fv3rzHQx48fH/FNRffeey8/+MEPqu377LPPMmDAgPD6okWLePnll0859sGDB4eXi4uLufHGG1m8eDFbt26NGHdtroAVkeYppvuhm9lc4D13f9XM2gAdgCnAfnefbmY5QIq7P3yq54n3/dArW7BgAaNHj47a78orr2T16tURbQcOHOC6665j/fr1Ee2nnXYa/fr14+yzz6Zz584cOXKEwsJCtmzZEvGNQgAvvfQS9913X0TbnDlzuPvuu8Pr/fr1Y/369bRr167G+rZv386AAQM4fPgwUPEuYv369fTr16/a/vn5+fTt25ejR49GHXtjnz2j+6E3HN0PvWWJ9X7oUY/QzawLMBh4DcDdj7v7AWAEMDfUbS5wS12LjYdRo0ZF/TagmnTt2pXc3FzGjRsXccZMeXk5mzdvZunSpcybN4/FixeTm5tbJczNrMo8fl5eHhMmTAivd+jQgQULFpwyzAHOO+88XnrppfD60aNHGTVqFCUlJdX279WrF3PmzIl6y18RCb5YplzOAfYCb5jZf5rZq2bWEchw992hPgVARnUPNrNsM9tgZhv27t0bn6prMGvWLNatW8f999/PxRdfTGpqKm3atInpsW3btuWVV15h06ZNjBkzJuptdJOSkrj00kv59a9/zSeffBLxjUknQvjIkSPhtueff56+ffvGVMsPf/jDiCP7rVu3MnHixBr7jxo1iq1bt/L4448zZMgQunXrpoAXaYGiTrmYWRbwIfBd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lDdTMQcYBEuBO0NnTgwEDrr77kQXVV9mduaJOUozu4SKf0dN/j9QqObXgK3uPquGbs1un8Uyrma8z9LNrGtouT1wLZB3UrelwNjQ8m3Af3joU8WmKpZx1SUXG/xui17DLQLM7Algg7svBf6Pmd0MlFLxYdxdDV1XPJjZm1ScPZBmZjuBx6n4cAN3f5mKq2hvALYDJcDdiam0dmIY123AeDMrBf4HGN3U/wOFfBf4EfBfoblLgClAT2jW+yyWcTXXfdYNmGsVX6hzGvCWu799Un68Bvw/M9tORX6MTly5MYtlXLXORV0pKiISEE3lQ1EREaknBbqISEAo0EVEAkKBLiISEAp0EZGAUKCLiASEAl1EJCAU6CIiAfH/AaHgSwT1onppAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "values = [30, 70, 40]\n",
    "plt.bar([1, 2, 3], values)\n",
    "\n",
    "plt.text(1, 60, \"text\"\n",
    "         , ha=\"center\"\n",
    "         , fontsize=40) # 水平对齐方式：居中\n",
    "# 绘制所有柱子标签\n",
    "for x,y in zip(range(1, 4), values):\n",
    "#     print(x, y)\n",
    "    plt.text(x, y, str(y), fontsize=15, ha='center'\n",
    "             , va='bottom'# 垂直的基准线为bottom)\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "16b35488",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
